/**
 *
 */
package utils;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * Parse the main configuration file into a proper lists and vars.
 * @author Alon Segal
 *
 */
public class Settings {
	
	private Properties prop;
	public static String logFile;

	/**
	 * @param name Name od file to be parsed.
	 */
	public Settings(String name) {
		this.prop = new Properties();
		try{
			//loading file content into data structure prop
			this.prop.load(new FileInputStream(name));
		}catch(IOException e){
			System.out.println("Error reading the configuration file");
		}
		this.parse();
	}

	/**
	 * Parse the file into workable vars.
	 */
	private void parse() {
		this.parseSettings();
	}

	// private functions

	private void parseSettings() {
		Settings.logFile = prop.getProperty("logfile");
		
	}

	

}
